#include<iostream>
#include<pthread.h>
#include<time.h>
#include<sys/types.h>
#include<unistd.h>
#include"threadpool.hpp"
#include"task.hpp"
using namespace std;

int main()
{
    srand((unsigned int)time(nullptr)^getpid());
    threadPool<Caltask>::getthpptr()->run();
while(true)
{
   int x=rand()%100;
    int y=rand()%10;
int num=rand()%oper.size();
Caltask t(x,y,oper[num],mymath);

threadPool<Caltask>::getthpptr()->push(t);//把任务放进队列中
cout<<"push task in queue"<<endl;
sleep(1);
}
    return 0;
}
